<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    function sx(x , y){
        debugger;
        for(var i = x; i <= y; i++){
            var a = i;
            var b = Math.floor(a / 100);
            var c = Math.floor((a % 100) / 10);
            var d = a % 10;
            // var e = b * b * b + c * c * c + d * d * d;
            var e = b ** 3 + c ** 3 + d ** 3;
            // var e = Math.pow(b,3) + Math.pow(c,3) +Math.pow(d,3);
            console.log(a,b,c,d,e)

            if(a == e){
                result = a + "<br>";
            }
        }
    return result;
    }
    document.write(sx(100 , 999));

</script>
</html>